Skip to content

feat(web): animate task completion segments - #10259

Draft
saphid wants to merge 2 commits into
pingdotgg:mainfrom
saphid:feat/composer-task-progress-motion
Draft

feat(web): animate task completion segments#10259
saphid wants to merge 2 commits into
pingdotgg:mainfrom
saphid:feat/composer-task-progress-motion

Conversation

@saphid

@saphid saphid commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Current revision ed8a0068f: replaced the simple Motion tween with Tailwind transform classes and motion-reduce:transition-none, and removed the unused Motion dependency. 82 focused composer tests and web typecheck pass; scoped lint/format/diff checks pass. This remains a draft pending fresh integrated UI proof.

What Changed

Completed tasks now fill their small progress segment over a 180 ms tween while the current-task label and completed count update immediately. A CSS transform transition animates only the decorative fill; it no longer loads Motion. Existing tasks render at their current state when mounted, and reduced motion skips the tween.

Why

The existing progress strip switches colors instantly. A brief fill makes real task completion easier to notice without delaying task state or moving the disclosure control. Related: #10250. This leaves the task-row status semantics in #10128 to that PR.

Earlier UI evidence

These recordings predate the CSS implementation at ed8a006. Fresh integrated CSS/reduced-motion proof is pending. Actual base and candidate ComposerTasksBadge components were recorded with the same synthetic task sequence in the isolated Vite app: complete a task, reverse and re-complete after 75 ms, then reopen history. The fixture exercises real rendering, but does not exercise provider ingestion or the full ChatView lifecycle. Base eee0557; candidate 94e5450; dark theme, 1280×800 CSS viewport. Contextual crops, no deliberate playback speed change; recordings illustrate the transition and do not establish exact 180 ms timing.

Before:

Before: task completion changes the segment immediately

After:

After: the completion segment fills while count and task text update

Before video · After video · Before image · After image

At 390 CSS pixels the segments remain hidden and the fixture has no horizontal overflow. Native reduced-motion emulation is unavailable through the attached preview tools, so runtime reduced-motion verification and the full provider-driven ChatView pass remain readiness gaps. This remains a draft. The native mobile client is outside this change.

Validation: CI=true pnpm exec vp test run apps/web/src/composer-logic.test.ts apps/web/src/components/composerFooterLayout.test.ts passed 82 tests across 2 files. Targeted vp lint and vp fmt --check passed, as did git diff --check. Installed package exports resolve motion and useReducedMotion from motion/react at 13.2.0.

The task-state boundary check CI=true pnpm exec vp test run apps/web/src/session-logic.test.ts -t deriveActivePlanState passed 6 tests (93 unrelated tests skipped by filter).

The worker's initial typecheck failed on workspace dependency diagnostics. Primary then installed the frozen lockfile in a fresh isolated integration worktree and ran vp run --filter @t3tools/web typecheck: exit 0 with the candidate integrated. The first worker test/lint attempt failed on missing workspace dependencies; installing the frozen lockfile repaired those checks.

Best-effort independent review: direct claude --model claude-opus-5 --effort high --print --output-format json --permission-mode plan --allowedTools Read Glob Grep --no-session-persistence exited 1 before inference: OAuth session expired and could not be refreshed. Claude did not review this change.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Model and harness: GPT-6 Astra medium in Codex/T3 Code.

Note

Animate task completion segments in ComposerTasksBadge

Adds the motion package and reworks each segment in ComposerTasksBadge.tsx so the status-colored fill scales horizontally to represent completion. Existing history renders at its current state (initial animation disabled); later transitions use a 0.18s ease-out tween, or zero duration when reduced-motion is detected.

Macroscope summarized 94e5450.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 6, 2026
Comment thread apps/web/src/components/chat/ComposerTasksBadge.tsx Outdated
@saphid

saphid commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Integrated pass in a real client (web, worktree build at head 94e5450, isolated state, real provider turns): ChatView lifecycle is healthy across multiple provider-driven turns (task creation, file edits, completion) — no crashes, no console errors, composer/banners/stash all behave.

One gap I could not close: the tasks badge itself never renders because no provider available to me emits plan events. The CC (claudeAgent) harness exposes no TodoWrite tool, and native Codex (0.153.4 via app-server) turns completed without any turn.plan.updated events (model reports update_plan as unavailable; confirmed zero plan events in orchestration_events). So the badge + tween path remains exercised only by the isolated fixture, not by a live provider turn. If a maintainer has a provider config that does emit plan updates, I'd appreciate a heads-up — otherwise this may be worth a note in the PR on which provider setups actually surface the badge.

Reduced motion remains verified by the component tests (useReducedMotionduration: 0); I couldn't emulate the media query in the automation browser. Holding in draft until the plan-event path is demonstrated live.

@github-actions github-actions Bot added size:S 10-29 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant